package cn.mw.cmdb.template.enums;

/**
 * @description zabbix监控类型枚举
 */
public enum ZabbixMonitorTypeEnum {
    ZABBIX_AGENT("0","Zabbix 客户端"),
    ZABBIX_TRAPPER("2","Zabbix采集器"),
    SIMPLE_CHECK("3","简单检查"),
    ZABBIX_INTERNAL("5","Zabbix内部"),
    ZABBIX_AGENT_ACTIVE("7","Zabbix 客户端(主动式)"),
    WEB_MONITOR_ITEM("9","Web监控项"),
    EXTERNAL_CHECK("10","外部检查"),
    DATABASE_MONITOR("11","数据库监控"),
    IPMI_AGENT("12","IPMI客户端"),
    SSH_AGENT("13","SSH客户端"),
    TELNET_AGENT("14","TELNET客户端"),
    COUNT("15","可计算的"),
    JMX_AGENT("16","JMX agent代理程序"),
    SNMP_TRAP("17","SNMP trap"),
    BE_DEPENDENT_ON_TRAP("18","相关项目"),
    HTTP_AGENT("19","HTTP代理"),
    SNMP_AGENT("20","SNMP代理"),
    SCRIPT("21","脚本"),

    ;

    private String type;

    private String name;

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    ZabbixMonitorTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public static ZabbixMonitorTypeEnum getMonitorTypeEnum(String type) {
        for (ZabbixMonitorTypeEnum monitorTypeEnum : values()) {
            if (type.equals(monitorTypeEnum.getType())) {
                return monitorTypeEnum;
            }
        }
        return null;
    }
}
